<?php

Yii::import('common.models._base.BaseClassWithVenue');

class ClassWithVenue extends BaseClassWithVenue {

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public static function getVenueName($classId) {
        $data = ClassWithVenue::model()->findAll('classes_id=:classes_id', array(':classes_id' => (int) $classId));
        return $data;
    }
    
    public static function saveLocality($localityname){        
       $locality= LocalityName::model()->findByAttributes(array('locality_name'=>$localityname));      
        if(empty($locality)){
            $localitymodel=new LocalityName();
            $localitymodel->setAttribute('locality_name', $localityname);
            $localitymodel->setAttribute('status', SkillConfig::STATUS_DEACTIVE);
            $localitymodel->setAttribute('users_id', getLoginUserId());
            $localitymodel->save();
            LocalityName::getlocaltyLatLogn($localitymodel->id, $localityname);
            
        }
    }

}
